//
//  GYVerFavoritesCell.m
//  GoodLuck
//
//  Created by apple on 2018/3/16.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "GYVerFavoritesCell.h"

@interface GYVerFavoritesCell ()

@property (weak, nonatomic) IBOutlet UIImageView *goodsImageview;
@property (weak, nonatomic) IBOutlet UILabel *goodNameLable;
@property (weak, nonatomic) IBOutlet UILabel *goodsPrice;
//@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imageViewWidthCons;

@end
@implementation GYVerFavoritesCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (IBAction)deleteBtuClick:(UIButton *)sender {
    self.deleteFavoritesGoodsCallBack(self.currentRow);
}

- (void)setGoods:(GYGoodsFavorites *)goods {
    _goods = goods;
    
    [self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:goods.goods_image_url] placeholderImage:[UIImage imageNamed:@"4"]];
    self.goodNameLable.text = goods.goods_name;
    self.goodsPrice.text = [NSString stringWithFormat:@"¥%@",goods.goods_price];
}

//- (CGFloat)height:(GYGoodsFavorites *)model {
//    self.goods = model;
//    
//    self.imageViewWidthCons.constant = (ScreenWidth-5)/2;
//    [self layoutIfNeeded];
//    
//    return CGRectGetMaxY(self.goodsPrice.frame)+5;
//}
@end
